<template>
  <div>

    <div class="Logout">
      <Logout>退出</Logout>
    </div>
    <h1>更新事件信息</h1>

   <div class="image">
   <el-image :src="src2"></el-image>
   <!-- <el-image :src="src1"></el-image> -->
    </div>



    <el-input style="width: 800px" size="medium" v-model="eno" placeholder="请输入事件编号" prefix-icon="el-icon-s-check" maxlength="10" show-word-limit clearable></el-input>
    
     <el-input style="width: 800px" size="medium" v-model="ename" placeholder="请输入人员ID" prefix-icon="el-icon-user-solid" maxlength="50" show-word-limit clearable></el-input> 
   
    <el-input style="width: 800px" size="medium" v-model="ebirth" placeholder="请输入事件时间" prefix-icon="el-icon-s-data" maxlength="50" show-word-limit clearable></el-input>
    
     <!-- <el-input style="width: 800px" size="medium" v-model="edie" placeholder="请输入家训" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input> -->
     <el-input style="width: 800px" size="medium" v-model="emarry" placeholder="请输入事件类型" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>

      <!-- <el-input style="width: 800px" size="medium" v-model="eaddress" placeholder="请输入族长联系方式" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input> -->

      <el-input style="width: 800px" size="medium" v-model="epartner" placeholder="请输入事件描述" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>

      <el-input style="width: 800px" size="medium" v-model="echild" placeholder="请输入事件附件" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>

      <!-- <el-input style="width: 800px" size="medium" v-model="elife" placeholder="请输入恩荣录" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>

       <el-input style="width: 800px" size="medium" v-model="ehonor" placeholder="请输入更新时间" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input> -->

     
     
     
   
    <el-row>
      <el-button @click="updateBtn" type="success" icon="el-icon-upload">提交</el-button>
    </el-row>
  </div>
</template>

<script>
import Logout from "./Logout";
export default {
  name: "UpdateEvent",
  components:{Logout},
  created(){
    this.eno = this.$route.query.eno;
    this.ename = this.$route.query.ename;
    this.ebirth = this.$route.query.ebirth;
    this.edie = this.$route.query.edie;
     this.emarry = this.$route.query.emarry;
    this.epartner = this.$route.query.epartner;
    this.eaddress = this.$route.query.eaddress;
    this.echild = this.$route.query.echild;
     this.elife = this.$route.query.elife;
    this.ehonor = this.$route.query.ehonor;
   
  },
  methods: {
    search(){

    },
    updateBtn(){
      let data = {
        eno:this.eno,
        ename:this.ename,
        ebirth:this.ebirth,
        edie:this.edie,
        emarry :this.emarry,
        epartner : this.epartner,
        eaddress :this.eaddress,
        echild :this.echild,
        elife :this.elife,
        ehonor :this.ehonor
   



      };
      this.$axios.post(`/EditEvent`,data).then((res) => {
        console.log(res);
        if(res.data ==="更新成功"){
          alert("更新成功");

        } else {
          alert(res.data.msg)
        }
      });


    }
  },

  data() {
    return {

      src2:"https://pic1.zhimg.com/v2-f56894a8a6254d9729f68b253bd7c0ec_b.jpg",
      eno:'',
      ename:'',
      ebirth:'',
      edie:'',
        emarry:'',
      epartner:'',
      echild:'',
      elife:'',
       ehonor:'',
      eaddress:''
   




    }
  }
}
</script>

<style scoped>

</style>
